package pa2.node;

import java.rmi.RemoteException;
import java.util.Map;

import pa2.util.EqualityCompare;

public abstract class NodeFactoryDecorator implements NodeFactory {

	protected NodeFactory decoratedNodeFactory;
	
	public NodeFactoryDecorator (NodeFactory decoratedNodeFactory) {
		this.decoratedNodeFactory = decoratedNodeFactory;
	}
	
	
	@Override
	public <K extends EqualityCompare<K>, V, M extends Map<K, V>> Node<K, V, M> createNode(
			K key, NodeData<K, V, M> data) throws RemoteException {
		return this.decoratedNodeFactory.createNode(key, data);
	}

	@Override
	public <K extends EqualityCompare<K>, V, M extends Map<K, V>> void destroyNode(
			Node<K, V, M> node) throws RemoteException {
		this.decoratedNodeFactory.destroyNode(node);
	}

}
